Optimal. Leaf size=66 \[ \frac {(B c+A d) x^{1+n} (e x)^m}{1+m+n}+\frac {B d x^{1+2 n} (e x)^m}{1+m+2 n}+\frac {A c (e x)^{1+m}}{e (1+m)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 66, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 3, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, Rules used = {459, 20, 30}
\begin {gather*} \frac {x^{n+1} (e x)^m (A d+B c)}{m+n+1}+\frac {A c (e x)^{m+1}}{e (m+1)}+\frac {B d x^{2 n+1} (e x)^m}{m+2 n+1} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 20
Rule 30
Rule 459
Rubi steps
\begin {align*} \int (e x)^m \left (A+B x^n\right ) \left (c+d x^n\right ) \, dx &=\int \left (A c (e x)^m+(B c+A d) x^n (e x)^m+B d x^{2 n} (e x)^m\right ) \, dx\\ &=\frac {A c (e x)^{1+m}}{e (1+m)}+(B d) \int x^{2 n} (e x)^m \, dx+(B c+A d) \int x^n (e x)^m \, dx\\ &=\frac {A c (e x)^{1+m}}{e (1+m)}+\left (B d x^{-m} (e x)^m\right ) \int x^{m+2 n} \, dx+\left ((B c+A d) x^{-m} (e x)^m\right ) \int x^{m+n} \, dx\\ &=\frac {(B c+A d) x^{1+n} (e x)^m}{1+m+n}+\frac {B d x^{1+2 n} (e x)^m}{1+m+2 n}+\frac {A c (e x)^{1+m}}{e (1+m)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.06, size = 49, normalized size = 0.74 \begin {gather*} x (e x)^m \left (\frac {A c}{1+m}+\frac {(B c+A d) x^n}{1+m+n}+\frac {B d x^{2 n}}{1+m+2 n}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 0.06, size = 262, normalized size = 3.97
method | result | size |
risch | \(\frac {x \left (B d \,m^{2} x^{2 n}+B d m n \,x^{2 n}+A d \,m^{2} x^{n}+2 A d m n \,x^{n}+B c \,m^{2} x^{n}+2 B c m n \,x^{n}+2 B \,x^{2 n} d m +B \,x^{2 n} d n +A c \,m^{2}+3 A c m n +2 A c \,n^{2}+2 A \,x^{n} d m +2 A \,x^{n} d n +2 B \,x^{n} c m +2 B \,x^{n} c n +d \,x^{2 n} B +2 A c m +3 A c n +d \,x^{n} A +c B \,x^{n}+A c \right ) {\mathrm e}^{\frac {m \left (-i \pi \mathrm {csgn}\left (i e x \right )^{3}+i \pi \mathrm {csgn}\left (i e x \right )^{2} \mathrm {csgn}\left (i e \right )+i \pi \mathrm {csgn}\left (i e x \right )^{2} \mathrm {csgn}\left (i x \right )-i \pi \,\mathrm {csgn}\left (i e x \right ) \mathrm {csgn}\left (i e \right ) \mathrm {csgn}\left (i x \right )+2 \ln \left (e \right )+2 \ln \left (x \right )\right )}{2}}}{\left (1+m \right ) \left (1+m +n \right ) \left (1+m +2 n \right )}\) | \(262\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.31, size = 85, normalized size = 1.29 \begin {gather*} \frac {\left (x e\right )^{m + 1} A c e^{\left (-1\right )}}{m + 1} + \frac {B d x e^{\left (m \log \left (x\right ) + 2 \, n \log \left (x\right ) + m\right )}}{m + 2 \, n + 1} + \frac {B c x e^{\left (m \log \left (x\right ) + n \log \left (x\right ) + m\right )}}{m + n + 1} + \frac {A d x e^{\left (m \log \left (x\right ) + n \log \left (x\right ) + m\right )}}{m + n + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 176 vs.
\(2 (68) = 136\).
time = 1.21, size = 176, normalized size = 2.67 \begin {gather*} \frac {{\left (B d m^{2} + 2 \, B d m + B d + {\left (B d m + B d\right )} n\right )} x x^{2 \, n} e^{\left (m \log \left (x\right ) + m\right )} + {\left ({\left (B c + A d\right )} m^{2} + B c + A d + 2 \, {\left (B c + A d\right )} m + 2 \, {\left (B c + A d + {\left (B c + A d\right )} m\right )} n\right )} x x^{n} e^{\left (m \log \left (x\right ) + m\right )} + {\left (A c m^{2} + 2 \, A c n^{2} + 2 \, A c m + A c + 3 \, {\left (A c m + A c\right )} n\right )} x e^{\left (m \log \left (x\right ) + m\right )}}{m^{3} + 2 \, {\left (m + 1\right )} n^{2} + 3 \, m^{2} + 3 \, {\left (m^{2} + 2 \, m + 1\right )} n + 3 \, m + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 1499 vs.
\(2 (58) = 116\).
time = 13.54, size = 1499, normalized size = 22.71 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 327 vs.
\(2 (68) = 136\).
time = 2.28, size = 327, normalized size = 4.95 \begin {gather*} \frac {B d m^{2} x x^{m} x^{2 \, n} e^{m} + B d m n x x^{m} x^{2 \, n} e^{m} + B c m^{2} x x^{m} x^{n} e^{m} + A d m^{2} x x^{m} x^{n} e^{m} + 2 \, B c m n x x^{m} x^{n} e^{m} + 2 \, A d m n x x^{m} x^{n} e^{m} + A c m^{2} x x^{m} e^{m} + 3 \, A c m n x x^{m} e^{m} + 2 \, A c n^{2} x x^{m} e^{m} + 2 \, B d m x x^{m} x^{2 \, n} e^{m} + B d n x x^{m} x^{2 \, n} e^{m} + 2 \, B c m x x^{m} x^{n} e^{m} + 2 \, A d m x x^{m} x^{n} e^{m} + 2 \, B c n x x^{m} x^{n} e^{m} + 2 \, A d n x x^{m} x^{n} e^{m} + 2 \, A c m x x^{m} e^{m} + 3 \, A c n x x^{m} e^{m} + B d x x^{m} x^{2 \, n} e^{m} + B c x x^{m} x^{n} e^{m} + A d x x^{m} x^{n} e^{m} + A c x x^{m} e^{m}}{m^{3} + 3 \, m^{2} n + 2 \, m n^{2} + 3 \, m^{2} + 6 \, m n + 2 \, n^{2} + 3 \, m + 3 \, n + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.83, size = 91, normalized size = 1.38 \begin {gather*} {\left (e\,x\right )}^m\,\left (\frac {A\,c\,x}{m+1}+\frac {x\,x^n\,\left (A\,d+B\,c\right )\,\left (m+2\,n+1\right )}{m^2+3\,m\,n+2\,m+2\,n^2+3\,n+1}+\frac {B\,d\,x\,x^{2\,n}\,\left (m+n+1\right )}{m^2+3\,m\,n+2\,m+2\,n^2+3\,n+1}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________